<!doctype html>
<title>Event listener</title>

<button>click me</button>

<script>

//Access the button
var button = document.querySelector("button");
button.addEventListener("click", clickHandler, false);

//Create a score variable and initialize it to zero
var score = 0;
console.log(score);

	
function clickHandler()
{
  score = score + 1;
  console.log(score);
}
	
</script>